Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure scratch directory exists when calling extractCache #29

Merged
merged 1 commit into from
May 1, 2024

Conversation

Chagui-
Copy link
Contributor

@Chagui- Chagui- commented Apr 16, 2024

When running the action for the first time and no cache exists, inject does not get called, so scratch dir is not created. Then extracting the cache fails because it tries to write to scratch/buildstamp but the scratch folder does not exist.

Workaround is to chance the scrath folder to some other folder that already exists:

  - name: inject cache into docker
    uses: reproducible-containers/buildkit-cache-dance@v3
    with:
      ...
      scratch-dir: folder_that_exists_in_the_repo

This PR ensures the directory exists even if the inject job is not called. Should fix #23

@Chagui- Chagui- force-pushed the patch-1 branch 3 times, most recently from 2398406 to fd82f47 Compare April 16, 2024 20:47
@AkihiroSuda
Copy link
Member

Thanks, but CI is failing

@Chagui-
Copy link
Contributor Author

Chagui- commented Apr 23, 2024

yeah i forgot to build, so i did, then i was missing the signed off so i added it following the instructions (which added a new commit). But the the pipeline was mad because the last commit didn't contain the build.

I reverted and now everything should be contained in a single commit.

@Chagui-
Copy link
Contributor Author

Chagui- commented Apr 24, 2024

Not sure why its failing now

@AkihiroSuda
Copy link
Member

Please try this

- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Install and Build
run: pnpm i

Signed-off-by: Andres Peñaloza <[email protected]>
@Chagui-
Copy link
Contributor Author

Chagui- commented Apr 25, 2024

I did try that but it was not updating anything in the dist folder.
I added --no-cache and it seem to have worked.

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit 336b023 into reproducible-containers:main May 1, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scratch/buildstamp: No such file or directory
2 participants